package com.cohen.hellogeometry;
import java.util.Scanner;

public class Run {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner input = new Scanner ( System.in );
		float angle1 = 0;
		float angle2 = 0;
		float angle3 = 0;
		boolean allAnglesInput = false;
		String triangleType;
		do {
			if (allAnglesInput == true){
				System.out.println("No such triangle can exist with those angles.\nPlease ensure that the angles add to 180 degrees.");
			}
			System.out.println("Please input angle 1.");
			angle1 = input.nextInt();
			System.out.println("Please input angle 2.");
			angle2 = input.nextInt();
			System.out.println("Please input angle 3.");
			angle3 = input.nextInt();
			allAnglesInput = true;
		} while ((angle1 + angle2 + angle3) != 180);
		if (angle1 == angle2 || angle2 == angle3){
			triangleType = "equilateral";
		} else if (angle1 == angle2 || angle1 == angle3 || angle2 == angle3){
			triangleType = "isosceles";
		} else {
			triangleType = "scalene";
		}
		System.out.println("A triangle with those angles would be " + triangleType + ".");


	}

}